package com.jinghua.treatment.controller;

import com.jinghua.treatment.entity.Demo;
import com.jinghua.treatment.service.DemoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

/**
 * Created by qifan on 2018/2/20.
 */

@Controller
@RequestMapping("/")
public class DemoController {
    @Autowired
    private DemoService studentService;

    @ApiOperation(value = "测试")
    @GetMapping("/getPatientList")
    public String getAllDemo(Model model) {
        System.out.println("##########");
       // List<Demo> list = studentService.findAllDemo();
        model.addAttribute("msg","你好");
        model.addAttribute("title","患者列表");
        return "patient/patientList";
    }
}
